package com.c6906.vdam.das.common;

import lombok.Getter;

@Getter
public enum EWTypeEnum {
    NO_TASK("108", "公车私用"),
    UNAUTH_TASK("109", "擅自改变出行线路"),
    ILLEGAL_PLACE("110", "违规出入特定场所"),
    ILLEGAL_PARK("111", "违规停车"),
    WARN_SUM("199", "公车预警汇总");

    private final String id;
    private final String name;

    EWTypeEnum(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public static String getName(String id) {
        for (EWTypeEnum ewTypeEnum : values()) {
            if (ewTypeEnum.getId().equals(id)) {
                return ewTypeEnum.name;
            }
        }
        return null;
    }
}
